import numpy as np
from python_ai.common.xcommon import sep

from sklearn.datasets import load_iris

x, y = load_iris(True)

from sklearn.model_selection import train_test_split

x_train, x_test, y_train, y_test = train_test_split(x, y, train_size=0.7, random_state=666)

from sklearn.naive_bayes import GaussianNB

model = GaussianNB()
model.fit(x_train, y_train)
print(f'Training score: {model.score(x_train, y_train)}')
print(f'Testing score: {model.score(x_test, y_test)}')
